package create.builder.old;

/**
 * @author dali
 * @date 2021-07-09 15:27
 * @Description 具体建造者
 */

public class FiveBuilder implements HouseBuilder {
    //这个建造者给房子赋的值
    private String base = "五角大楼的地基";
    private String wall = "五角大楼的墙";
    private String cell = "五角大楼的吊顶";
    private House house;

    public FiveBuilder() {
        house = new House();
    }

    @Override
    public HouseBuilder buildBase() {
        house.setBase(base);
        return this;
    }

    @Override
    public HouseBuilder buildWall() {
        house.setWall(wall);
        return this;
    }

    @Override
    public HouseBuilder buildCell() {
        house.setCell(cell);
        return this;
    }

    @Override
    public House getHouse() {
        return house;
    }
}
